how molecules form